<?php
	$DefSelect = '------------------------ Todos ------------------------'; 
	form_pr('QueryOrders','',$GLOBALS['URL'].'Aplications/Consoles/gestinvoice.mex','post'); ?>
<table width="100%"  border="0" cellpadding="3" cellspacing="1">
        <tr bgcolor="#F2F2F2">
          <td rowspan="2" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>Periodo:
			  </td>
              <td><?php echo 'De: ';
		mn_field('date','ED','TStart',$TimeStart,10,8,'false','');
		echo ' At�: ';
		mn_field('date','ED','TEnd',$TimeEnd,10,8,'false','');?></td>
            </tr>
            <tr>
              <td>País:</td>
              <td><?php
		$Qur = "SELECT pai_CodElite AS ID, pai_NombreESP AS NAME 
		  		FROM hd_paises WHERE pai_ActivoGiros = 1";
		  mn_field('select','ED','Country',$Country,$Qur,$DefSelect,'False',''); ?></td>
            </tr>
            <tr>
              <td>Dominio:</td>
              <td><?php
		$Qur = "SELECT dom_ID AS ID, dom_RazonSocial AS NAME 
		  		FROM dominios WHERE dom_Activo = 1";
		  mn_field('select','ED','FraOrigen1',$Origen1,$Qur,$DefSelect,'False','" onchange="
		  document.QueryOrders.action=\''.$MODURL.'Lib/a05_filt_050101.mex\';
		  subform(\'QueryOrders\',\'filt_050101\');'); ?></td>
            </tr>
            <tr>
              <td>Origem:</td>
              <td><div id="filt_050101"><?php include($MODPAD.'Lib/a05_filt_050101.mex'); ?></div></td>
            </tr>
            <tr>
              <td>Corresponsal:</td>
              <td><?php
		$Qur = "SELECT CorrNumero AS ID, CorrNombre AS NAME 
		  		FROM corresponsales WHERE CorrActivo = 1";
		  mn_field('select','ED','FraCorresponsal',$Corresponsal,$Qur,$DefSelect,'False',''); ?></td>
            </tr>
            <tr>
              <td>Estado:</td>
              <td><?php
		$Qur = "SELECT sg_ID AS ID, sg_Descripcion AS NAME 
		  		FROM hd_statusfacturas";
		  mn_field('select','ED','FraStatus',$Status,$Qur,$DefSelect,'False',''); ?></td>
            </tr>
          </table></td>
          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>Remetente</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','CliNombre','','','False',''); ?></td>
              <td>Corresponsal</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraCorresponsal','','','False',''); ?></td>
            </tr>
            <tr>
              <td>Beneficiario</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','BnfNombre','','','False',''); ?></td>
              <td>C&acirc;mbio</td>
              <td>
                <?php mn_field('checkbox','ED','VIEWColumns[]','FraTasa','checked','','False',''); ?></td>
            </tr>
            <tr>
              <td>Dominio</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraOrigen0','','','False',''); ?></td>
              <td>Estado</td>
              <td><?php 
			  if (isset($Colums[4])) { $Check = 'checked';} else { $Check = '';}
			  mn_field('checkbox','ED','VIEWColumns[]','FraStatus',$Check,'','False',''); ?></td>
            </tr>
            <tr>
              <td>Origen</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraOrigen1','','','False',''); ?></td>
              <td>CPF</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','BnfCedula','checked','','False',''); ?></td>
            </tr>
            <tr>
              <td>Loja</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraOrigen0','','','False',''); ?></td>
              <td>Dados Bancários </td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','ORAccount','checked','','False',''); ?></td>
            </tr>
            <tr>
              <td>Pais</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraCorresponsal','','','False',''); ?></td>
              <td>ObservaÇ&otilde;es</td>
              <td><?php mn_field('checkbox','ED','VIEWColumns[]','FraNotas','checked','','False',''); ?></td>
            </tr>
          </table>
          </td>
          <td valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="1">
            <tr>
              <td>Ordenar por:</td>
              <td>
			  <?php 
			  $Qur = 'Opera��o;Data;Enviado;A pagar;Status;CPF;Banco;Agencia;Tipo Conta#FraID;FraFechaIngreso;FraEnviado;FraARecibir;FraStatus;BnfCedula;cb_Banco;cb_Sucursal;cb_TipoCuenta';
			  mn_field('hselect','ED','OrderBy1','',$Qur,'','False','');
			  $OrderOps = "ASC;DESC#ASC;DESC";
			  mn_field('mselect','ED','OrderAD1','ASC',$OrderOps,'1','False',''); ?>
              </td>
            </tr>
            <tr>
              <td>2&ordf; Ordenação : </td>
              <td>
			  <?php 
			  $Qur = ';Opera��o;Data;Enviado;A pagar;Status;CPF;Banco;Agencia;Tipo Conta#;FraID;FraFechaIngreso;FraEnviado;FraARecibir;FraStatus;BnfCedula;cb_Banco;cb_Sucursal;cb_TipoCuenta';
			  mn_field('hselect','ED','OrderBy2','',$Qur,'','False','');
			  mn_field('mselect','ED','OrderAD2','ASC',$OrderOps,'1','False',''); ?></td>
            </tr>
            <tr>
              <td>e seguido de: </td>
              <td>
			  <?php 
			  mn_field('hselect','ED','OrderBy3','',$Qur,'','False','');
			  mn_field('mselect','ED','OrderAD3','ASC',$OrderOps,'1','False',''); ?></td>
            </tr>
          </table></td>
        </tr>
        <tr bgcolor="#F2F2F2">
          <td colspan="2" bgcolor="#F2F2F2"><table width="100%"  border="0" cellpadding="1" cellspacing="1">
            <tr>
              <td width="0">
	<?php 
	mn_field('button','ED','QueryOrders','Consultar','','','False','" onClick="
	replaceUrl(\'ConsoleRS\',\''.$GLOBALS['URL'].'Modules/FTK9D4D0/Lib/a05_elem_order.mex\');
	subform(\'QueryOrders\',\'Console\');');
	mn_field('button','ED','DetailOrder','Ver Factura','','','False','" onClick="subform(\'QueryOrders\',\'Console\');'); ?>
	</td>
              <td width="100%"><div id="SUMS"><?php include($MODPAD.'Lib/vie_console.mex'); ?></div></td>
            </tr>
          </table>          </td>
        </tr>
</table>
</form>
<DIV id="ConsoleRS"></DIV>